import request from '@/utils/request'

const NodeApi = {
    Node: '/api/v1/node',
    Nodecreate: '/api/v1/node/create',
    NodeModify: '/api/v1/node/modify',
    NodeDelete: '/api/v1/node/delete',
}

//获取节点列表
export const GetNode = data => {
    return request({
        url: NodeApi.Node,
        method: 'get',
    })
}

//增加节点
export const CreateNode = data => {
    return request({
        url: NodeApi.Nodecreate,
        method: 'post',
        data: data,
    })
}

//修改节点信息
export const ModifyNode = (data) => {
    return service({
        url: NodeApi.NodeModify,
        method: 'put',
        data: data
    })
}

//删除节点信息
export const deleteNode = (data) => {
    return service({
        url: NodeApi.NodeDelete,
        method: 'delete',
        data: data
    })
}